﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace UtilsORM.MySqlData;

[Index("f_guid", Name = "fguid")]
[Index("f_m_guid", Name = "fmguid")]
[Index("f_type", Name = "ftype")]
[MySqlCharSet("utf8mb3")]
[MySqlCollation("utf8mb3_general_ci")]
public partial class iot_device_model_file
{
    [Key]
    public long f_id { get; set; }

    /// <summary>
    /// 设备型号编号，很重要，代码里判断设备型号
    /// </summary>
    [StringLength(50)]
    public string f_guid { get; set; }

    /// <summary>
    /// 目录
    /// </summary>
    [StringLength(100)]
    public string f_path { get; set; }

    /// <summary>
    /// 文件名
    /// </summary>
    [StringLength(255)]
    public string f_filename { get; set; }

    /// <summary>
    /// 文件类型
    /// </summary>
    [StringLength(100)]
    public string f_extension { get; set; }

    /// <summary>
    /// 访问地址
    /// </summary>
    [StringLength(100)]
    public string f_url { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? f_addtime { get; set; }

    /// <summary>
    /// iot_device_model
    /// </summary>
    [StringLength(50)]
    public string f_m_guid { get; set; }

    /// <summary>
    /// logo,info，file
    /// </summary>
    [StringLength(50)]
    public string f_type { get; set; }
}
